package jym.tan.tmdb.bean;

import java.io.Serializable;
import java.util.List;

import com.google.gson.annotations.SerializedName;

/**
 * The Class MovieInfo.
 * <p>
 * 	The properties are:
 * 	<ul>
 * 		<li>adult</li>
 * 		<li>backdrop_path</li>
 * 		<li>belongs_to_collection</li>
 * 		<li>budget</li>
 * 		<li>genres</li>
 * 		<li>homepage</li>
 * 		<li>id</li>
 * 		<li>imdb_id</li>
 * 		<li>original_title</li>
 * 		<li>overview</li>
 * 		<li>popularity</li>
 * 		<li>poster_path</li>
 * 		<li>production_companies</li>
 * 		<li>production_countries</li>
 * 		<li>release_date</li>
 * 		<li>revenue</li>
 * 		<li>runtime</li>
 * 		<li>spoken_languages</li>
 * 		<li>tagline</li>
 * 		<li>title</li>
 * 		<li>vote_average</li>
 * 		<li>vote_count</li>
 * 	</ul>
 * </p>
 * @author Tanmoy
 */
public class MovieInfo extends Movie implements Serializable {

	private static final long serialVersionUID = -265547580229796954L;
	
	@SerializedName("adult")
	private boolean adult;
	
	@SerializedName("belongs_to_collection")
	private MovieCollection belongsToCollection;
	
	@SerializedName("budget")
	private long budget;
	
	@SerializedName("genres")
	private List<Genre> genres;
	
	@SerializedName("homepage")
	private String homepage;
	
	@SerializedName("imdb_id")
	private String imdbId;
	
	@SerializedName("original_title")
	private String originalTitle;
	
	@SerializedName("overview")
	private String overview;
	
	@SerializedName("popularity")
	private String popularity;
	
	@SerializedName("production_companies")
	private List<ProductionCompany> productionCompanies;
	
	@SerializedName("production_countries")
	private List<ProductionCountry> productionCountries;
	
	@SerializedName("release_date")
	private String releaseDate;
	
	@SerializedName("revenue")
    private long revenue;
	
	@SerializedName("runtime")
    private int runtime;
	
	@SerializedName("spoken_languages")
    private List<SpokenLanguage> spokenLanguages;
	
	@SerializedName("tagline")
    private String tagline;
	
	@SerializedName("title")
	private String title;
	
	@SerializedName("vote_average")
    private float voteAverage;
	
	@SerializedName("vote_count")
    private int voteCount;
	
	/**
	 * Default Constructor.
	 */
	public MovieInfo() {
		
	}

	/**
	 * Checks if is adult.
	 *
	 * @return 
	 * 		true, if is adult
	 */
	public boolean isAdult() {
		return adult;
	}

	/**
	 * Sets the adult.
	 *
	 * @param adult 
	 * 		The new adult
	 */
	public void setAdult(boolean adult) {
		this.adult = adult;
	}

	/**
	 * Gets the {@link MovieCollection} object.
	 *
	 * @return 
	 * 		The <code>MovieCollection</code> object
	 */
	public MovieCollection getBelongsToCollection() {
		return belongsToCollection;
	}

	/**
	 * Sets the {@link MovieCollection} object.
	 *
	 * @param belongsToCollection 
	 * 		The new The <code>MovieCollection</code> object
	 */
	public void setBelongsToCollection(MovieCollection belongsToCollection) {
		this.belongsToCollection = belongsToCollection;
	}

	/**
	 * Gets the budget.
	 *
	 * @return 
	 * 		The budget
	 */
	public long getBudget() {
		return budget;
	}

	/**
	 * Sets the budget.
	 *
	 * @param budget 
	 * 		The new budget
	 */
	public void setBudget(long budget) {
		this.budget = budget;
	}

	/**
	 * Gets the {@link List} of {@link Genre} objects.
	 *
	 * @return 
	 * 		The <code>List</code> of <code>Genre</code>
	 */
	public List<Genre> getGenres() {
		return genres;
	}

	/**
	 * Sets the {@link List} of {@link Genre}.
	 *
	 * @param genres 
	 * 		The new <code>List</code> of <code>Genre</code>
	 */
	public void setGenres(List<Genre> genres) {
		this.genres = genres;
	}

	/**
	 * Gets the homepage.
	 *
	 * @return 
	 * 		The homepage
	 */
	public String getHomepage() {
		return homepage;
	}

	/**
	 * Sets the homepage.
	 *
	 * @param homepage 
	 * 		The new homepage
	 */
	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}

	/**
	 * Gets the imdb id.
	 *
	 * @return 
	 * 		The imdb id
	 */
	public String getImdbId() {
		return imdbId;
	}

	/**
	 * Sets the imdb id.
	 *
	 * @param imdbId 
	 * 		The new imdb id
	 */
	public void setImdbId(String imdbId) {
		this.imdbId = imdbId;
	}

	/**
	 * Gets the original title.
	 *
	 * @return 
	 * 		The original title
	 */
	public String getOriginalTitle() {
		return originalTitle;
	}

	/**
	 * Sets the original title.
	 *
	 * @param originalTitle 
	 * 		The new original title
	 */
	public void setOriginalTitle(String originalTitle) {
		this.originalTitle = originalTitle;
	}

	/**
	 * Gets the overview.
	 *
	 * @return 
	 * 		The overview
	 */
	public String getOverview() {
		return overview;
	}

	/**
	 * Sets the overview.
	 *
	 * @param overview 
	 * 		The new overview
	 */
	public void setOverview(String overview) {
		this.overview = overview;
	}

	/**
	 * Gets the popularity.
	 *
	 * @return 
	 * 		The popularity
	 */
	public String getPopularity() {
		return popularity;
	}

	/**
	 * Sets the popularity.
	 *
	 * @param popularity 
	 * 		The new popularity
	 */
	public void setPopularity(String popularity) {
		this.popularity = popularity;
	}

	/**
	 * Gets the {@link List} of {@link ProductionCompany}.
	 *
	 * @return 
	 * 		The <code>List</code> of <code>ProductionCompany</code>
	 */
	public List<ProductionCompany> getProductionCompanies() {
		return productionCompanies;
	}

	/**
	 * Sets the {@link List} of {@link ProductionCompany}.
	 *
	 * @param productionCompanies 
	 * 		The new <code>List</code> of <code>ProductionCompany</code>
	 */
	public void setProductionCompanies(List<ProductionCompany> productionCompanies) {
		this.productionCompanies = productionCompanies;
	}

	/**
	 * Gets the {@link List} of {@link ProductionCountry}.
	 *
	 * @return 
	 * 		The <code>List</code> of <code>ProductionCountry</code>
	 */
	public List<ProductionCountry> getProductionCountries() {
		return productionCountries;
	}

	/**
	 * Sets the {@link List} of {@link ProductionCountry}.
	 *
	 * @param productionCountries 
	 * 		The new <code>List</code> of <code>ProductionCountry</code>
	 */
	public void setProductionCountries(List<ProductionCountry> productionCountries) {
		this.productionCountries = productionCountries;
	}

	/**
	 * Gets the release date.
	 *
	 * @return 
	 * 		The release date
	 */
	public String getReleaseDate() {
		return releaseDate;
	}

	/**
	 * Sets the release date.
	 *
	 * @param releaseDate 
	 * 		The new release date
	 */
	public void setReleaseDate(String releaseDate) {
		this.releaseDate = releaseDate;
	}

	/**
	 * Gets the revenue.
	 *
	 * @return 
	 * 		The revenue
	 */
	public long getRevenue() {
		return revenue;
	}

	/**
	 * Sets the revenue.
	 *
	 * @param revenue 
	 * 		The new revenue
	 */
	public void setRevenue(long revenue) {
		this.revenue = revenue;
	}

	/**
	 * Gets the runtime.
	 *
	 * @return 
	 * 		The runtime
	 */
	public int getRuntime() {
		return runtime;
	}

	/**
	 * Sets the runtime.
	 *
	 * @param runtime 
	 * 		The new runtime
	 */
	public void setRuntime(int runtime) {
		this.runtime = runtime;
	}

	/**
	 * Gets the {@link List} of {@link SpokenLanguage}.
	 *
	 * @return 
	 * 		The <code>List</code> of <code>SpokenLanguage</code>
	 */
	public List<SpokenLanguage> getSpokenLanguages() {
		return spokenLanguages;
	}

	/**
	 * Sets the {@link List} of {@link SpokenLanguage}.
	 *
	 * @param spokenLanguages 
	 * 		The new <code>List</code> of <code>SpokenLanguage</code>
	 */
	public void setSpokenLanguages(List<SpokenLanguage> spokenLanguages) {
		this.spokenLanguages = spokenLanguages;
	}

	/**
	 * Gets the tagline.
	 *
	 * @return 
	 * 		The tagline
	 */
	public String getTagline() {
		return tagline;
	}

	/**
	 * Sets the tagline.
	 *
	 * @param tagline 
	 * 		The new tagline
	 */
	public void setTagline(String tagline) {
		this.tagline = tagline;
	}
	
	/**
	 * Gets the title.
	 *
	 * @return 
	 * 		The title
	 */
	public String getTitle() {
		return title;
	}
	
	/**
	 * Sets the title.
	 *
	 * @param title 
	 * 		The new title
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * Gets the vote average.
	 *
	 * @return 
	 * 		The vote average
	 */
	public float getVoteAverage() {
		return voteAverage;
	}

	/**
	 * Sets the vote average.
	 *
	 * @param voteAverage 
	 * 		The new vote average
	 */
	public void setVoteAverage(float voteAverage) {
		this.voteAverage = voteAverage;
	}

	/**
	 * Gets the vote count.
	 *
	 * @return 
	 * 		The vote count
	 */
	public int getVoteCount() {
		return voteCount;
	}

	/**
	 * Sets the vote count.
	 *
	 * @param voteCount 
	 * 		The new vote count
	 */
	public void setVoteCount(int voteCount) {
		this.voteCount = voteCount;
	}	
	
	/* (non-Javadoc)
	 * @see jym.tan.tmdb.bean.Movie#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("{").
			append("adult:").append(adult).
			append(",").
			append("backdrop_path:").append("\"").append(backdropPath).append("\"").
			append(",").
			append("belongs_to_collection:").append(belongsToCollection).
			append(",").
			append("budget:").append(budget).
			append(",").
			append("genres:").append(genres).
			append(",").
			append("homepage:").append("\"").append(homepage).append("\"").
			append(",").
			append("id:").append(id).
			append(",").
			append("imdb_id:").append("\"").append(imdbId).append("\"").
			append(",").
			append("original_title:").append("\"").append(originalTitle).append("\"").
			append(",").
			append("overview:").append("\"").append(overview).append("\"").
			append(",").
			append("popularity:").append(popularity).
			append(",").
			append("poster_path:").append("\"").append(posterPath).append("\"").
			append(",").
			append("production_companies:").append(productionCompanies).
			append(",").
			append("production_countries:").append(productionCountries).
			append(",").
			append("release_date:").append("\"").append(releaseDate).append("\"").
			append(",").
			append("revenue:").append(revenue).
			append(",").
			append("runtime:").append(runtime).
			append(",").
			append("spoken_languages:").append(spokenLanguages).
			append(",").
			append("tagline:").append("\"").append(tagline).append("\"").
			append(",").
			append("title:").append("\"").append(title).append("\"").
			append(",").
			append("vote_average:").append(voteAverage).
			append(",").
			append("vote_count:").append(voteCount).
			append("}");
	    return builder.toString();
	}
}
